package com.hsd.ha.listener;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import org.apache.log4j.Logger;

import com.hsd.ha.cache.FdtsCache;

public class ConfigDataListener implements ServletContextListener  { 
		private ServletContext context = null;
		public static Logger log = Logger.getLogger(ConfigDataListener.class.getName());

		public void contextDestroyed(ServletContextEvent event) {
		}

		public void contextInitialized(ServletContextEvent event) {
			context = event.getServletContext();
			System.out.println("ConfigDataListener is starting ......");
			log.debug("ConfigDataListener is starting ......");
			FdtsCache.initFdtsCache(context);
			log.debug("ConfigDataListener is ready!");
			System.out.println("ConfigDataListener is ready!");
		}
} 
